package recursion

type FacPlus struct {
}

// 阶乘问题 走楼梯

func NewFactorialPlus() *FacPlus {
	return &FacPlus{}
}

func (fac *FacPlus) FactorialPlus(n float64) float64 {
	var result float64 = 1
	for i := float64(1); i <= n; i++ {
		result *= i
	}
	return result
}
